package cn.bdqn.applysystem.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import cn.bdqn.applysystem.dao.NoticeMapper;
import cn.bdqn.applysystem.entity.Notice;
import cn.bdqn.applysystem.service.NoticeService;

@Service("noticeServiceImpl")
public class NoticeServiceImpl implements NoticeService {

	@Autowired
	@Qualifier("noticeMapper")
	private NoticeMapper noticeMapper;
	
	@Override
	@Transactional(isolation=Isolation.DEFAULT,propagation=Propagation.REQUIRED)
	/**
	 * 增加公告（发送邮件）
	 * */
	public int sendNotice(Notice notice) {
		return noticeMapper.insertNotice(notice);
	}

}
